﻿($ => {
    $.getExamTools = ($eventEmitter, advancedSearch, examGrid) => {
        const handleClick = (toolId, data) => {
            $eventEmitter.trigger(toolId, {
                advancedSearch,
                examGrid,
                data
            });
        };
        const tool = {
            // 查看报告
            viewReport: {
                widget: 'dxButton',
                location: 'before',
                name: '登记_查看报告',
                options: {
                    text: '查看报告',
                    icon: '/icons/antd_file_pdf.svg',
                    focusStateEnabled: false,
                    onClick: () => {
                        handleClick('viewReport');
                    },
                },
            },
            // 查看图像
            viewImage: {
                widget: 'dxButton',
                location: 'before',
                name: '登记_查看图像',
                options: {
                    text: '查看图像',
                    icon: '/icons/antd_image.svg',
                    focusStateEnabled: false,
                    onClick: () => {
                        handleClick('viewImage');
                    },
                },
            },
        };
        return { ...tool };
    }
})(jQuery)